Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Ethflow] using the newest contract #736

Merged
merged 6 commits into from
Nov 8, 2022
Merged

[Ethflow] using the newest contract #736

merged 6 commits into from
Nov 8, 2022

Conversation

josojo
Copy link
Contributor

@josojo josojo commented Nov 7, 2022

Using the newest contracts. I needed to update ethcontract, due to cowprotocol/ethcontract-rs#854

self.extract_custom_and_general_order_data(events).await?;
let order_placement_events = events
.into_iter()
.filter(|EthContractEvent { data, .. }| {
Copy link
Contributor Author

@josojo josojo Nov 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only temporary. THe next PR will also index for the new cancellation event properly

@@ -19,16 +19,7 @@ fn main() {
println!("cargo:rerun-if-changed=build.rs");

generate_contract_with_config("CoWSwapEthFlow", |builder| {
builder
.contract_mod_override("cowswap_eth_flow")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We decided to deploy 1 contract for staging and 1 for prod. Hence, I don't import contract address as before, but rather via env variables

@josojo josojo marked this pull request as ready for review November 7, 2022 18:04
@josojo josojo requested a review from a team as a code owner November 7, 2022 18:04
Copy link
Contributor

@nlordell nlordell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - just a tiny ubernit, but fine with or without it.

@@ -45,6 +54,7 @@ impl std::fmt::Display for Arguments {
writeln!(f, "min_slippage_bps: {}", self.min_slippage_bps)?;
writeln!(f, "db_url: SECRET")?;
writeln!(f, "node_url: {}", self.node_url)?;
writeln!(f, "ethflow_contract: {}", self.ethflow_contract)?;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
writeln!(f, "ethflow_contract: {}", self.ethflow_contract)?;
writeln!(f, "ethflow_contract: {:?}", self.ethflow_contract)?;

With Display formatting: ethflow contract: 0x26c3…2830
With Debug formatting: ethflow contract: 0x26c3801b4840dab317cedfd7aeaf9f45fdd22830
I suggest the same change for the autopilot crate as well.

@josojo josojo enabled auto-merge (squash) November 8, 2022 10:17
@josojo josojo merged commit 2a978a6 into main Nov 8, 2022
@josojo josojo deleted the newContractRC branch November 8, 2022 10:22
@github-actions github-actions bot locked and limited conversation to collaborators Nov 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants